Skip to content

chore: migrate from Prettier to oxfmt for code formatting#11824

Open
yangshun wants to merge 5 commits intofacebook:mainfrom
yangshun:ys/oxfmt
Open

chore: migrate from Prettier to oxfmt for code formatting#11824
yangshun wants to merge 5 commits intofacebook:mainfrom
yangshun:ys/oxfmt

Conversation

@yangshun
Copy link
Copy Markdown
Contributor

@yangshun yangshun commented Mar 20, 2026

Summary

  • Replace Prettier with oxfmt as the code formatter
  • Add .oxfmtrc.json configuration and remove .prettierrc / .prettierignore
  • Update lint-staged config, CI workflows, and VS Code extensions accordingly
  • Reformat codebase with oxfmt

Test plan

  • Verify oxfmt formats all files correctly
  • Verify CI lint workflow passes
  • Verify lint-staged works on pre-commit

Notes on CI

  • Argos: 1 visual diff is reported and is intended — caused by oxfmt reflowing some MDX content (e.g. footnote spacing, list item spacing, ternary indentation in code blocks). Please approve the Argos build to accept the new baseline.
  • Lighthouse Report: failure is environmental (fork PRs lack pull-requests: write to post the sticky comment); the audit itself ran successfully.

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Mar 20, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 20, 2026

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 20, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 54cdc64
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/69f1deb86b44640008985716
😎 Deploy Preview https://deploy-preview-11824--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@akshatsinha0
Copy link
Copy Markdown
Contributor

Great Idea. Was searching for something like this.

@yangshun yangshun marked this pull request as ready for review April 8, 2026 15:14
@yangshun yangshun marked this pull request as draft April 8, 2026 15:19
@slorber slorber added pr: maintenance This PR does not produce any behavior differences to end users when upgrading. Argos Add this label to run UI visual regression tests. See argos.yml GH action. labels Apr 8, 2026
@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 changed Apr 29, 2026, 10:42 AM

@slorber
Copy link
Copy Markdown
Collaborator

slorber commented Apr 28, 2026

@yangshun let me know if you want to update this PR. Now that we upgraded node it should pass CI.

@yangshun
Copy link
Copy Markdown
Contributor Author

Sorry I dropped the ball on this, I'll update this PR within the next few days. Or if you want to take over go ahead as well.

@yangshun yangshun marked this pull request as ready for review April 29, 2026 10:37
@yangshun
Copy link
Copy Markdown
Contributor Author

yangshun commented Apr 29, 2026

@slorber updated to latest Oxlint and rebased against origin/main. I eyeballed the rest of the changes, they look fine.

  • Lighthouse failure: Seems to fail for all non-maintainer PRs
  • Argos failure: Intended as the formatting of some code blocks have changed, and the Argos screenshot captures that difference. I'm not sure how to update on my end. Can I trouble you to make the necessary updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants